package com.shop.test;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/*@Repository*/
public class DaoImpl {
	/*@Autowired*/
	SessionFactory sessionFactory ;
	
	public void setSessionFactory(SessionFactory sessionFactory) {
		System.out.println("run") ;
		this.sessionFactory = sessionFactory;
	}
	public void say(){
		System.out.println("cjw") ;
	}
	public void find(){
		Session session = sessionFactory.openSession() ;
		FileETC f = (FileETC) session.get(FileETC.class, 7) ;
		System.out.println(f.toString()) ;
	}
	
}
